package day04;

import java.util.Scanner;

public class TextClass {
    public static void main(String[] args) {
        System.out.println("请输入年份：");
        Scanner num = new Scanner(System.in);
        int year=num.nextInt();
        System.out.println("请输入月份：");
        Scanner number = new Scanner(System.in);
        int month=number.nextInt();
        int day=0;
        switch (month){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                day=31;

            case 4:
            case 6:
            case 9:
            case 11:
                day=30;
            case 2:
                if((year%4==0&&year%100!=0)|| year%400==0){
                    day=29;
                }else {
                    day=28;
                }
                System.out.println(year+"年"+month+"月有"+day+"天");
        }



      /*   Scanner number=new Scanner(System.in);
        int num=number.nextInt();
        if(num>0){
            System.out.println("+");
        }else if(num<0){
            System.out.println("-");
        }else {
            System.out.println("0");
        }





       int num=(int)(Math.random()*1000+1);
        System.out.println(num);
        Scanner scan=new Scanner(System.in);
        int guess;
        do{
            System.out.println("请继续猜测");
            guess=scan.nextInt();
            if(guess>num){
                System.out.println("输入的数大了");
                guess=scan.nextInt();
            }else if (guess<num){
                System.out.println("输入的数小了");
                guess=scan.nextInt();
            }else {
                System.out.println("输入准确！");
            }
        }while (guess!=num);
        Scanner a1=new Scanner(System.in);
     //   System.out.println("请输入一个合适的值,6为 登录 7为退出 8为注册");
        int num = (int)(Math.random()*1000+1);
        int guess = a1.nextInt();
        while (guess!=num){
            if(guess>num){
                System.out.println("数大了");
            }else {
                System.out.println("数小了");
            } guess = a1.nextInt();
            }System.out.println("输入正确！");

        }



        Scanner a1=new Scanner(System.in);
        System.out.println("请输入一个合适的值,6为 登录 7为退出 8为注册");
        int b1=a1.nextInt();
        switch (b1){
            case 6:
                System.out.println("你的操作为：登录");
                break;
            case  7:
                System.out.println("你的操作是：退出");
                break;
            case  8:
                System.out.println("你的操作为：注册");
                break;
            default:
                System.out.println("你的操作无效！");
        }



       for (int a=0;a<5;a++){
            System.out.println("行动是成功的阶梯");
        }
        for(int i=1;i<=9;i++){
            System.out.println(i+"*9="+i*9);
        }
        for(int i=1;i<=9;i+=2){
            System.out.println(i+"*9="+i*9);
        }
        for(int i=9;i>0;i--){
            System.out.println(i+"*9="+i*9);
        }
        int number=(int)(Math.random()*1000+1);
        System.out.println(number);
        Scanner scan=new Scanner(System.in);
        int guess;
        do{
            System.out.println("请继续猜测");
            guess=scan.nextInt();
            if(guess>number){
                System.out.println("输入的数大了");
                guess=scan.nextInt();
            }else if (guess<number){
                System.out.println("输入的数小了");
                guess=scan.nextInt();
            }else {
                System.out.println("输入准确！");
            }
        }while (guess!=number);




        Scanner num=new Scanner(System.in);
        System.out.println("请选择功能：1.取款 2.存款 3.转账 4.退出");
         int command= num.nextInt();
         switch (command){
             case 1:
                 System.out.println("您想要的方式为取款");
                 break;
             case 2:
                 System.out.println("取款了嗷");
                 break;
             case  3:
                 System.out.println("转账请注意");
                 break;
             case 4:
                 System.out.println("退出了嗷！");
                 break;
             default:
                 System.out.println("输出不存在！");
         }



         int number=(int)Math.random()*1000+1;
         System.out.println(number);
        Scanner scan=new Scanner(System.in);
        int guess=scan.nextInt();

         while (guess!=number){
             if(guess>number){
                 System.out.println("输入的数大了");
             }else{
                 System.out.println("输入的数小了");
             }
             System.out.println("请继续猜测");
             guess=scan.nextInt();
         }
         System.out.println("输入正确！");
         */

    }
}

